#ifndef _PLAYER_HPP_20120622
#define _PLAYER_HPP_20120622

#include "base.hpp"

#include "connection.hpp"

#include "role_data.hpp"
#include "cmd_comm.hpp"
#include "cmd_type.hpp"

using namespace mina;
using namespace cmd;

class Scence;

class Player
{
	public :
		Player(Connection & conn, const RoleData & role_data);
		~Player();

		void sitdown(const Position & position);
		void standup();
		
		const Position & position() const { return _position; }
		void position (const Position & p) { _position = p; }

		void game_status(uint16_t status)  { _game_status = status; }
		uint16_t game_status() const { return _game_status; }

		RID  id() const { return _role_data._id; }

	public :
		template <typename _Msg>
			int handle(Connection & conn, _Msg & msg)
			{
				return 0;
			}
	
	public :
		Connection *  _conn;

		RoleData      _role_data;

		uint16_t      _game_status;

		Position      _position;

		Scence *      _scence;

		DECL_LOGGER(logger);
};

#endif

